#作业一
_int = []
_low = []
_high = []
cont = {}
strr = input("输入：")
for i in strr:
    if i in cont.keys():
        cont[i] += 1
    elif not i in cont.keys():
        cont[i] = 1
    if 'a'<=i<='z':
        _low.append(i)
    elif 'A'<=i<='Z':
        _high.append(i)
    elif '0'<=i<='9':
        _int.append(i)
most_num = 0
most_char = None

for key,value in list(cont.items()):
    if value > most_num:
        most_num = value
        most_char = key
print(f"是数字的是:{_int}")
print(f"是小写字母的是:{_low}")
print(f"是大写字母的是:{_high}")
print(f"出现最多的字符是：{most_char},出现的次数是:{most_num}")



#作业二
#从键盘接受用户输入的用户名和密码，用户名为root、密码为123456 提示登录成功。
# 否则请重试，有3次重试机会，3次重试机会都用完了，提示登录失败


freq = 0
while freq<3 :
    user = input("请输入用户：")
    passwd = input("请输入密码：")
    if user == "root" and passwd == "123456":
        print("登录成功")
        break
    else:
        print("请重试")
        freq += 1

else:
    print("失败")